#ifndef CUBICSPLINE2D_H
#define CUBICSPLINE2D_H
#include "CubicSpline1D.h"
#include <vector>
#include <iostream>
#include <algorithm>
#include <numeric>
#include <cmath>

class CubicSpline2D
{
public:
    CubicSpline2D();
    CubicSpline2D(const std::vector<std::pair<double, double>>& x_y, const std::vector<double> s, const int vehicle_in_segment_start_index, const int vehicle_in_segment_index);
    double calc_x(double s);
    double calc_y(double s);
    double calc_yaw(double s);
    double calc_curvature(double s);
    CubicSpline1D sx, sy;
};

#endif  // CUBICSPLINE2D_H
